#include "findreplace.h"

DlgFindReplace::DlgFindReplace(QWidget *parent, Qt::WFlags f)
    : QDialog(parent, f) {

    this->setObjectName(QString::fromUtf8("this"));
    this->resize(QSize(400, 138).expandedTo(this->minimumSizeHint()));
    hboxLayout = new QHBoxLayout(this);
    hboxLayout->setSpacing(6);
    hboxLayout->setMargin(9);
    hboxLayout->setObjectName(QString::fromUtf8("hboxLayout"));
    vboxLayout = new QVBoxLayout();
    vboxLayout->setSpacing(6);
    vboxLayout->setMargin(0);
    vboxLayout->setObjectName(QString::fromUtf8("vboxLayout"));
    hboxLayout1 = new QHBoxLayout();
    hboxLayout1->setSpacing(6);
    hboxLayout1->setMargin(0);
    hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1"));
    label = new QLabel(this);
    label->setObjectName(QString::fromUtf8("label"));

    hboxLayout1->addWidget(label);

    txtFind = new QLineEdit(this);
    txtFind->setObjectName(QString::fromUtf8("txtFind"));

    hboxLayout1->addWidget(txtFind);


    vboxLayout->addLayout(hboxLayout1);

    hboxLayout2 = new QHBoxLayout();
    hboxLayout2->setSpacing(6);
    hboxLayout2->setMargin(0);
    hboxLayout2->setObjectName(QString::fromUtf8("hboxLayout2"));
    label_2 = new QLabel(this);
    label_2->setObjectName(QString::fromUtf8("label_2"));

    hboxLayout2->addWidget(label_2);

    txtReplace = new QLineEdit(this);
    txtReplace->setObjectName(QString::fromUtf8("txtReplace"));

    hboxLayout2->addWidget(txtReplace);


    vboxLayout->addLayout(hboxLayout2);

    chkCase = new QCheckBox(this);
    chkCase->setObjectName(QString::fromUtf8("chkCase"));

    vboxLayout->addWidget(chkCase);

    chkWord = new QCheckBox(this);
    chkWord->setObjectName(QString::fromUtf8("chkWord"));

    vboxLayout->addWidget(chkWord);

    spacerItem = new QSpacerItem(79, 70, QSizePolicy::Minimum, QSizePolicy::Expanding);

    vboxLayout->addItem(spacerItem);

    hboxLayout->addLayout(vboxLayout);

    vboxLayout1 = new QVBoxLayout();
    vboxLayout1->setSpacing(6);
    vboxLayout1->setMargin(0);
    vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1"));
    cmdFindNext = new QPushButton(this);
    cmdFindNext->setObjectName(QString::fromUtf8("cmdFindNext"));

    vboxLayout1->addWidget(cmdFindNext);

    cmdReplace = new QPushButton(this);
    cmdReplace->setObjectName(QString::fromUtf8("cmdReplace"));

    vboxLayout1->addWidget(cmdReplace);

    cmdReplaceAll = new QPushButton(this);
    cmdReplaceAll->setObjectName(QString::fromUtf8("cmdReplaceAll"));

    vboxLayout1->addWidget(cmdReplaceAll);

    cmdCancel = new QPushButton(this);
    cmdCancel->setObjectName(QString::fromUtf8("cmdCancel"));

    vboxLayout1->addWidget(cmdCancel);

    hboxLayout->addLayout(vboxLayout1);

    label->setBuddy(txtFind);
    label_2->setBuddy(txtFind);

    setupStrings();
    connect(cmdCancel, SIGNAL(clicked()), this, SLOT(close()));
}

void DlgFindReplace::setupStrings() {
    setWindowTitle(tr("Find and Replace"));
    label->setText(tr("Find what:"));
    label_2->setText(tr("Replace with:"));
    chkCase->setText(tr("Match &case"));
    chkWord->setText(tr("Match whole &words"));
    cmdFindNext->setText(tr("&Find Next"));
    cmdReplace->setText(tr("&Replace"));
    cmdReplaceAll->setText(tr("Replace &All"));
    cmdCancel->setText(tr("&Close"));
}
